<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of myBasketItem
 *
 * @author aneto
 */
class myBasketItem {

	protected $product;
	protected $qty;

	public function __construct(Product $product, $qty = 1){
		$this->product = $product;
		$this->qty = $qty;
	}

	public function getSingleProductPrice(){
		return $this->product->getPriceActual();
	}

	public function getPrice(){
		return $this->getSingleProductPrice() * $this->qty;
	}

	public function getPic(){
		return isset($this->product['ProductPictures'][0]) ? $this->product['ProductPictures'][0]['file'] : '/notfound';
	}


	public function getName(){
		return $this->product['name'];
	}

	public function getId(){
		return $this->product['id'];
	}

	public function getQty(){
		return $this->qty;
	}

	public function getInstock(){
		return $this->product['instock'];
	}




	

}
?>
